package com.ruoyi.web.controller.fenxi.utils;

import java.util.ArrayList;
import java.util.List;

public class QueueModel {
    public static final String STATUS_ANALYSIS_UNZIP_START = "analysis_unzip_start";
    public static final String STATUS_ANALYSIS_CONDA_UNZIP_START = "analysis_conda_unzip_start";
    public static final String STATUS_ANALYSIS_START_SH_START = "analysis_start_sh_start";
    public static final String STATUS_ANALYSIS_SHUTDOWN_SH_START = "analysis_shutdown_sh_start";
    public static final String STATUS_ALL_END = "all_end";

    private Long id;

    private String serviceName;

    private String code;

    private String path;

    private String condaPath;

    private String fileName;

    private String startName;

    //当前状态： 已上传、已解析excel、开始插入、完成
    private String curStatus;

    //记录开始插入后的错误记录信息
    private List<String> errors;

    //当前的操作用户
    private Long userId;

    private Integer Total;

    private Integer current;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getCondaPath() {
        return condaPath;
    }

    public void setCondaPath(String condaPath) {
        this.condaPath = condaPath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getStartName() {
        return startName;
    }

    public void setStartName(String startName) {
        this.startName = startName;
    }

    public String getCurStatus() {
        return curStatus;
    }

    public void setCurStatus(String curStatus) {
        this.curStatus = curStatus;
    }

    public List<String> getErrors() {
        return errors;
    }

    public void setErrors(List<String> errors) {
        this.errors = errors;
    }

    public void addError(String error) {
        if(errors == null) {
            errors = new ArrayList<>();
        }
        errors.add(error);
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getTotal() {
        return Total;
    }

    public void setTotal(Integer total) {
        Total = total;
    }

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }
}
